package com.shigen.file.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.shigen.file.serializer.DateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 * 问卷收集表
 * </p>
 *
 * @author shigen.fu
 * @since 2022-06-04
 */
@ApiModel(value = "Project对象", description = "问卷收集表")
@Data
@ToString
@Accessors(chain = true)
public class Project implements Serializable {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty("自增的ID")
  @TableId(value = "auto_id", type = IdType.AUTO)
  private Integer autoId;

  @ApiModelProperty("问卷的ID")
  private String projId;

  @ApiModelProperty("问卷的名字")
  private String projName;

  @ApiModelProperty("表单的配置信息")
  private String config;

  @ApiModelProperty("开始时间")
  @JsonSerialize(using = DateTimeSerializer.class)
  private Date beginTime;

  @ApiModelProperty("结束时间")
  @JsonSerialize(using = DateTimeSerializer.class)
  private Date endTime;

  @ApiModelProperty("标题")
  private String title;

  @ApiModelProperty("描述")
  @TableField(value = "`describe`")
  private String describe;

  @ApiModelProperty("表单的组件")
  private String list;

  @ApiModelProperty("每人只能填写一次 0----false 1----true")
  private Integer writeOnce;

  @ApiModelProperty("是否停止，1---true 0---false")
  private Integer isStop;

  @ApiModelProperty("创建人id")
  private Long createUserId;

  @ApiModelProperty("创建人姓名")
  private String createUserName;

  private Integer isDel;

  @ApiModelProperty("更新时间")
  @JsonSerialize(using = DateTimeSerializer.class)
  private Date updateTime;

  @ApiModelProperty("创建时间")
  @JsonSerialize(using = DateTimeSerializer.class)
  private Date createTime;

  @ApiModelProperty("表单数据提交后跳转地址")
  private String callbackUrl;
}
